import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

import MusicIndex from '../views/Music/index'
import MusicIndexList from '../views/Music/MusicIndexList'
import MusicDetails from '../views/Music/MusicDetails'
import MusicPlayUrl from '../views/Music/MusicPlayUrl'
import Citys from '../views/Music/City'
import SearchMusic from '../views/Music/SearchMusic'

import MovieIndex from '../views/Movie/index'
import MovieIndexList from '../views/Movie/MovieIndexList'
import MovieDetail from '../views/Movie/MovieDetail'
import MovieSearch from '../views/Movie/MovieSearch'

import ArticleIndex from '../views/Article/index'
import ArticleDetail from '../views/Article/ArticleDetail'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/music/index',
    component: MusicIndex,
    meta: {
      isNav: true
    }
  },
  {
    path: '/music/indexKind',
    component: MusicIndexList
  },
  {
    path: '/music/detail',
    component: MusicDetails
  },
  {
    path: '/music/play',
    component: MusicPlayUrl
  },
  {
    path: '/city',
    component: Citys
  },
  {
    path: '/music/search',
    component: SearchMusic
  },


  {
    path: '/movie/index',
    component: MovieIndex,
    meta: {
      isNav: true
    }
  },
  {
    path: '/movie/indexKind',
    component: MovieIndexList
  },
  {
    path: "/movie/detail",
    component: MovieDetail
  },
  {
    path: "/movie/search",
    component: MovieSearch
  },

  {
    path: '/article/index',
    component: ArticleIndex,
    meta: {
      isNav: true
    }
  },
  {
    path: '/article/detail',
    component: ArticleDetail
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
